package com.jiegui.pay.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jiegui.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.jiegui.pay.mapper.OrderChannelInfoMapper;
import com.jiegui.pay.domain.OrderChannelInfo;
import com.jiegui.pay.service.OrderChannelInfoService;

/**
 * 通道信息Service业务层处理
 * 
 * @author wuqicheng
 * @date 2021-12-10
 */
@Service
public class OrderChannelInfoServiceImpl extends ServiceImpl<OrderChannelInfoMapper, OrderChannelInfo> implements OrderChannelInfoService
{
    @Resource
    private OrderChannelInfoMapper orderChannelInfoMapper;

    /**
     * 查询通道信息
     * 
     * @param id 通道信息主键
     * @return 通道信息
     */
    @Override
    public OrderChannelInfo selectOrderChannelInfoById(Long id)
    {
        return orderChannelInfoMapper.selectById(id);
    }

    /**
     * 查询通道信息列表
     * 
     * @param orderChannelInfo 通道信息
     * @return 通道信息
     */
    @Override
    public List<OrderChannelInfo> selectOrderChannelInfoList(OrderChannelInfo orderChannelInfo)
    {
        return orderChannelInfoMapper.selectOrderChannelInfoList(orderChannelInfo);
    }

    /**
     * 新增通道信息
     * 
     * @param orderChannelInfo 通道信息
     * @return 结果
     */
    @Override
    public int insertOrderChannelInfo(OrderChannelInfo orderChannelInfo)
    {
        return orderChannelInfoMapper.insert(orderChannelInfo);
    }

    /**
     * 修改通道信息
     * 
     * @param orderChannelInfo 通道信息
     * @return 结果
     */
    @Override
    public int updateOrderChannelInfo(OrderChannelInfo orderChannelInfo)
    {

        return orderChannelInfoMapper.updateById(orderChannelInfo);
    }

    /**
     * 批量删除通道信息
     * 
     * @param ids 需要删除的通道信息主键
     * @return 结果
     */
    @Override
    public int deleteOrderChannelInfoByIds(Long[] ids)
    {
        return orderChannelInfoMapper.delete(new LambdaQueryWrapper<OrderChannelInfo>().in(OrderChannelInfo::getId,ids));
    }

    /**
     * 删除通道信息信息
     * 
     * @param id 通道信息主键
     * @return 结果
     */
    @Override
    public int deleteOrderChannelInfoById(Long id)
    {
        return orderChannelInfoMapper.deleteById(id);
    }
}
